<template>
	<view class="content">
    <up-swiper v-if="bannerList.length" radius="8" height="160"
      keyName="image" 
      :autoPlay="true"
      showTitle
      :list="bannerList"></up-swiper>
	  <!-- <up-search placeholder="输入关键字" bg-color="#e3e3e3" v-model="keyword"></up-search> -->
	</view>
</template>

<script setup>
  import {onLoad} from '@dcloudio/uni-app'
  import { ref } from 'vue';

  import {getBanner} from '../../api/api.js'

  
  const bannerList = ref([]);
  // 响应式数据  
  const keyword = ref('');
  onLoad(()=>{
    getBanner().then(res=>{
      console.log(res);
      bannerList.value = res.bannerlist;
    })
  })
			
</script>

<style lang="scss">
	.content {
		padding: 20rpx;
	}
</style>
